﻿using System;
using wojilu.ORM;

namespace wojilu.Apps.Qycms.Domain
{
    [Table("ybb_site")]
    [Serializable]
    public class site : ObjectBase<site>
    {
        /// <summary>
        /// 排序字段,默认为50
        /// </summary>
        [Default(50), NotNull("请输入排序"), Column(Length = 5), TinyInt]
        public Int32 pid { get; set; }

        [NotNull(""), Column(Length = 100)]
        public String sitename { get; set; }

        [NotNull(""), Column(Length = 100)]
        public String sitehttp { get; set; }

        [Default("admin"), NotNull(""), Column(Length = 30)]
        public String sitedir { get; set; }

        [NotNull(""), Column(Length = 100)]
        public String sitecode { get; set; }

        [NotNull(""), Column(Length = 50)]
        public String siteip { get; set; }

        [NotNull(""), Column(Length = 50)]
        public String adminusername { get; set; }

        [NotNull("")]
        public DateTime addtime { get; set; }

        [NotSave]
        public String link
        {
            get
            {
                return sitehttp + "/" + sitedir + "/SiteCode.aspx?siteid=" + Id + "&code=" + sitecode + "&adminid=" + adminusername;
            }
        }
    }
}
